import { ModuleConfig } from '@cool-midway/core';
import { DoupiaopiaoAuthorityMiddleware } from '../doupiaopiao/middleware/authority';

/**
 * 模块配置
 */
export default () => {
  return {
    // 模块名称
    name: 'mango',
    // 模块描述
    description: 'mango模块，主要提供电影票的功能',
    // 中间件，只对本模块有效
    middlewares: [DoupiaopiaoAuthorityMiddleware],
    // 中间件，全局有效
    globalMiddlewares: [],
    // 模块加载顺序，默认为0，值越大越优先加载
    order: 0,
    request: {
      base_url: 'https://api-service.mgmovie.net',
      agent_id: '100594',
      app_id: '656',
      api_token: '8f6f4af7f0b72cafcd980dd19ad82e7e',
    },
    testRequest: {
      base_url: 'http://api-dev.mgmovie.net',
      agent_id: '100594',
      app_id: '656',
      api_token: '1b506c4d80abd65c4408d37467022dd1',
    },
    requests: {
      base_url: 'http://api-dev.mgmovie.net',
      agent_id: '100858',
      app_id: '1507',
      api_token: '837ee46b9b7a461aea6eec47b6733d6d',
    },
  } as ModuleConfig;
};
